Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rnx-kit/tools-language

Package Overview
Dependencies
Maintainers
8
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rnx-kit/tools-language

A collection of supplemental JavaScript functions and types

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

@rnx-kit/tools-language

Build npm version

@rnx-kit/tools-language is a collection of supplemental JavaScript functions and types.

You can import the entire package, or, to save space, import individual categories:

import * from "@rnx-kit/tools-language";

import * from "@rnx-kit/tools-language/function";
import * from "@rnx-kit/tools-language/math";
import * from "@rnx-kit/tools-language/properties";
CategoryFunctionDescription
arrayaddRange(to, from, start, end)Add elements from one array to another, returning the resulting array.
arrayisNonEmptyArray(array)Returns whether the specified object is a non-empty array.
arraytoIndex(array, offset)Convert an array offset to an array index. An offset can be positive or negative, while an index is always positive.
functiontryInvoke(fn)Invoke the given function, returning its result or a thrown error.
mathisApproximatelyEqual(f1, f2, tolerance)Decide if two numbers, integer or decimal, are "approximately" equal. They're equal if they are close enough to be within the given tolerance.
propertiesextendObject(obj, extendedProps)Add properties to an object, changing it from its current type to an extended type.
propertiesextendObjectArray(arr, extendedProps)Add properties to each object in an array, changing the object from its current type to an extended type.
propertieshasProperty(obj, property)Returns whether property exists in obj.
propertieskeysOf(obj)Returns the names of the enumerable string properties of an object. Equivalent to calling Object.keys(), but type safe.
propertiespickValue(obj, key, name)Pick the value for property key from obj and return it in a new object. If name is given, use it in the new object, instead of key.
propertiespickValues(obj, keys, names)Pick the value for each key property from obj and return each one in a new object. If names are given, use them in the new object, instead of keys.

FAQs

Package last updated on 01 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc